﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JScriptSuite.InteropServices;
using JScriptSuite.JScriptGeneration;
using JScriptSuite.Html;

namespace JScriptSuite.QA.Lib
{
    public abstract class JResultItem : JObject
    {
        [JScriptSpecialName("tag")]
        public abstract string Tag { get; set; }

        [JScriptSpecialName("items")]
        public abstract JArray Items { get; }

        [JScriptSpecialName("children")]
        public abstract JArray Children { get; }


        [JScriptInlineMethod("{{tag:{1}, items:[], children: []}}")]
        internal static JResultItem CreateInstance(string tag)
        {
            return HtmlWindow.Invoke<JResultItem>(tag);
        }

    }
}
